package com.example.zk1.model;

import com.example.net.RetrofitFactory;
import com.example.zk1.Api;
import com.example.zk1.contract.LoginContract;

import java.util.HashMap;

import io.reactivex.Observable;

public class LoginModel implements LoginContract.LoginModel {
    @Override
    public Observable appMed(HashMap<String, String> map) {
        Api api = RetrofitFactory.getInstance("https://api.apiopen.top/").create(Api.class);
        return api.App(map);


    }

    @Override
    public Observable regMed(HashMap<String, String> map) {
        Api api = RetrofitFactory.getInstance("https://api.apiopen.top/").create(Api.class);
        return api.Register(map);
    }

    @Override
    public Observable logMed(HashMap<String, String> map) {
        Api api = RetrofitFactory.getInstance("https://api.apiopen.top/").create(Api.class);
        return api.Login(map);
    }

    @Override
    public void destory() {

    }
}
